ss=input('请输入年份：')
while not ss.isdigit() or len(ss) !=4:
    ss=input('输入年份无效，请输入一个四位年份数字:')
year=int(ss)
if year%4==0 and year%100 != 0:
    print('%s是闰年！'%year)
elif year%400 ==0:
    print('%s年是闰年！'%year)
else:
    print('%s年不是闰年！'%year)
